<div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="index.html">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">片库管理</span></div>
        </div>
        <div class="search-wrap">
           
		   
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th>影片id</th>
							<th>详情</th>
							<th>短连接</th>
                            <th>操作</th>
                        </tr>
                        <foreach name="re" item="v">
                        <tr>
                           <td>{$v.id}</td>
						   <TD>
						   	   <a onclick="datu({$v.pid})" style="cursor:pointer;">
								 <img src="{$v.img}" width=50 height=50/>
							   </a>
						  
						   </TD>
						   <td>
						   
						   {$v.url}</td>
						   <td>
						    <a style="cursor:pointer;" onclick="del({$v.id})">从片库删除</a>
							  
						   </td>
                        </tr>
						</foreach>
                    </table>
                    <div class="list-page"> {$page}</div>
                </div>
            </form>
        </div>
    </div>
	<script>
	  
	    function del(i){
		
		  if(confirm('您确定从片库删除此影片吗')){
		    
			$.post("{:U('Pianku/del')}",{"id":i},function(re){
			  
			  if(re==1){
			    
				alert('删除成功');
			    location.reload();
			  }else{
			  
			    alert('删除失败');
			  }
			
			
			})
		  
		  
		  }
		
		}
	  
	    function datu(i){
			  layer.open({
				  type: 2,
				  title: '视频详情',
				  shadeClose: true,
				  shade: 0.8,
				  area: ['80%', '90%'],
				  content: '{:U("Pianku/big")}?id='+i //iframe的url
				}); 
			}
	
	</script>
	